//****************************************************************************
// @Module        Timer 0/1
// @Filename      T01.H
// @Project       board1.dav
//----------------------------------------------------------------------------
// @Controller    Infineon XC888CLM-8FF
//
// @Compiler      Keil
//
// @Codegenerator 1.4
//
// @Description:  This file contains all function prototypes and macros for 
//                the T01 module.
//
//----------------------------------------------------------------------------
// @Date          25.05.2011 10:47:08
//
//****************************************************************************

// USER CODE BEGIN (T01_Header,1)

// USER CODE END



#ifndef _T01_H_
#define _T01_H_

//****************************************************************************
// @Project Includes
//****************************************************************************

// USER CODE BEGIN (T01_Header,2)

// USER CODE END


//****************************************************************************
// @Macros
//****************************************************************************

// USER CODE BEGIN (T01_Header,3)

// USER CODE END


//****************************************************************************
// @Defines
//****************************************************************************

// USER CODE BEGIN (T01_Header,4)

// USER CODE END

#define T01_TIMER_0          0
#define T01_TIMER_1          1
#define T01_MODE_0           0x00
#define T01_MODE_1           0x10
#define T01_MODE_2           0x20

//****************************************************************************
// @Typedefs
//****************************************************************************

// USER CODE BEGIN (T01_Header,5)

// USER CODE END


//****************************************************************************
// @Imported Global Variables
//****************************************************************************

// USER CODE BEGIN (T01_Header,6)

// USER CODE END


//****************************************************************************
// @Global Variables
//****************************************************************************

// USER CODE BEGIN (T01_Header,7)

// USER CODE END


//****************************************************************************
// @Prototypes Of Global Functions
//****************************************************************************

void T01_vInit(void);

// USER CODE BEGIN (T01_Header,8)

// USER CODE END


//****************************************************************************
// @Macro         T01_vStartTmr(TimerNr) 
//
//----------------------------------------------------------------------------
// @Description   This macro starts the chosen timer. The timer continues to 
//                count from where it has been stopped the last time. 
//                The following constants are available for 'TimerNr':
//                T01_TIMER_0, T01_TIMER_1
//                
//                Special feature when timer 0 is in mode 3:
//                'T01_TIMER_1' selects the second 8-bit timer TH0. 
//                'T01_vStartTmr1' must be used in order to start TL1/TH1.
//
//----------------------------------------------------------------------------
// @Returnvalue   None
//
//----------------------------------------------------------------------------
// @Parameters    TimerNr: 
//                Number of timer to be started
//
//----------------------------------------------------------------------------
// @Date          25.05.2011
//
//****************************************************************************

#define T01_vStartTmr(TimerNr)    _TR(TimerNr) = 1


#define _TH(TimerNr) TH##TimerNr
#define _TL(TimerNr) TL##TimerNr
#define _TR(TimerNr) TR##TimerNr
//****************************************************************************
// @Interrupt Vectors
//****************************************************************************


#define T0INT 1
// USER CODE BEGIN (T01_Header,9)

// USER CODE END

#endif  // ifndef _T01_H_
